home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / nerak2.zip / TRAINER.SCR < prev    next >
Text File  |  1995-09-24  |  7KB  |  256 lines

  1. !
  2. ! Default trainer script..
  3. !
  4. ! (c) DC Software, 1989-1995
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11.   if player.hp = 0 then
  12.     writeln( player.name, " is dead!" );
  13.     STOP;
  14.   endif;
  15.  
  16.   if npc.picture >= 0 then
  17.     viewpcx(npc);
  18.   endif;
  19.  
  20.   loadtext( npc.text ); ! Get the NPC's text block !
  21.   loadvfl( npc.voice ); ! Get the NPC's voice block !
  22. ! First, say hello.. !
  23.   if NPC.V0 > 0 then
  24.     writeln( "Hello ", player.name, ". What brings you back?" );
  25.   else
  26.     writeln( "Welcome to ", npc.name, ". How may I help you?" );
  27.   endif;
  28.  
  29. ! Now, set some variables..
  30.   NPC.V0 = 1; ! From know on, remember we've been here
  31.   L1   = 0; ! No business transactions have taken place
  32.   L15  = 0; ! Has not asked for credit.. 
  33.  
  34.   L4 = npc.value * (random(3)+1); ! Cost of STRENGTH training !
  35.   L5 = npc.value * (random(3)+1); ! Cost of DEXERITY training !
  36.   L6 = npc.value * (random(3)+1); ! Cost of AIM      training !
  37.   L7 = npc.value * (random(3)+1); ! Cost of Speed    training !
  38.   L8 = npc.value * (random(3)+1); ! Cost of IQ       training !
  39.  
  40. :LOOP
  41.  
  42.   L9 = random(5) + 2; ! Points given when training.. !
  43.  
  44.   L3 = select$( "Strength",     L4,
  45.                 "Dexterity",    L5,
  46.                 "Aim",          L6,
  47.                 "Speed",        L7,
  48.                 "Intelligence", L8,
  49.                 "Talk", -1 );
  50.  
  51.   IF L3 >= 0 AND L3 < 5 GOTO TRAIN;
  52.   IF L3 = 5             GOTO CHAT;
  53.  
  54. :CSTOP
  55.   if L1 = 0 then
  56.     writeln( "Next time buy something!" );
  57.   else
  58.     writeln( "It's been a pleasure doing business with you!" );
  59.   endif;
  60.   goto XSTOP;
  61.  
  62. !
  63. ! Want's to train..  Now find out WHO!
  64. !
  65. :TRAIN
  66.  
  67.   writeln( "Who want's to train?" );
  68.   L10 = select( group );
  69.   IF L10 < 0 GOTO LOOP;
  70.   group.current = L10;
  71.  
  72.   ON L3 GOTO XSTR, XDEX, XAIM, XSPD, XIQ;
  73.  
  74. !
  75. ! Increase your strength..
  76. !
  77. :XSTR
  78.  
  79.   if L4 > group.gold goto BROKE;
  80.  
  81.   dec( group.gold, L4 );
  82.   inc( player.mstr, L9 );
  83.   inc( player.str,  L9 );
  84.   writeln( player.name, " undergoes extensive physical training.." );
  85.   writeln( "Your strength has increased by ", L9, " units." );
  86.   inc( L1 );
  87.   GOTO LOOP;
  88.  
  89. !
  90. ! Increase your dexterity..
  91. !
  92. :XDEX
  93.  
  94.   if L5 > group.gold goto BROKE;
  95.  
  96.   dec( group.gold, L5 );
  97.   inc( player.mdex, L9 );
  98.   inc( player.dex,  L9 );
  99.   writeln( "Your dexterity has increased by ", L9, " units." );
  100.   inc( L1 );
  101.   GOTO LOOP;
  102.  
  103. !
  104. ! Increase your aim..
  105. !
  106. :XAIM
  107.  
  108.   if L6 > group.gold goto BROKE;
  109.  
  110.   dec( group.gold, L6 );
  111.   inc( player.maim, L9 );
  112.   inc( player.aim,  L9 );
  113.   writeln( "You practice with all kinds of missle weapons, including" );
  114.   writeln( "stationary and moving targets." );
  115.   writeln( "Your aim has increased by ", L9, " units." );
  116.   inc( L1 );
  117.   GOTO LOOP;
  118.  
  119. !
  120. ! Increase your speed
  121. !
  122. :XSPD
  123.  
  124.   if L7 > group.gold goto BROKE;
  125.  
  126.   dec( group.gold, L7 );
  127.   inc( player.mspd, L9 );
  128.   inc( player.spd,  L9 );
  129.   writeln( "You learn that every move you make is followed by another" );
  130.   writeln( "and practice teaches your body to anticipate that move and" );
  131.   writeln( "flow into it.  You never thought of yourself as 'gracefull'." );
  132.   writeln( "Your speed has increased by ", L9, " units." );
  133.   inc( L1 );
  134.   GOTO LOOP;
  135.  
  136. !
  137. ! Increase your iq..
  138. !
  139. :XIQ
  140.  
  141.   if L8 > group.gold goto BROKE;
  142.  
  143.   dec( group.gold, L8 );
  144.   inc( player.miq, L9 );
  145.   inc( player.iq,  L9 );
  146.   writeln( "You learn some new concentration techniques and fine tune" );
  147.   writeln( "your deductive reasoning methods.." );
  148.   writeln( "Your iq has increased by ", L9, " units." );
  149.   inc( L1 );
  150.   GOTO LOOP;
  151.  
  152. :BROKE
  153.   writeln( "You don't have enough money!");
  154.   voice( "Broke" );
  155.   goto LOOP;
  156.  
  157. !
  158. ! Handle conversation..
  159. !
  160. :CHAT
  161.   writeln( "What would you like to talk about?" );
  162.  
  163. :CHAT1
  164.   L3 = getstr("Name","Strength","Dexerity","Aim","I.Q.","Train","Credit","Job","Bye");
  165.   if L3 = -1 then 
  166.     writeln( "Ok." );
  167.     goto LOOP; ! Pressed ESCape !
  168.   endif;
  169.  
  170. ! First, see if the keyword typed is in the character's text block !
  171.   if dotext( S0 ) then
  172.     if L3 = 3 goto XSTOP;
  173.     goto CHAT1;
  174.   endif;
  175.  
  176. ! It didn't, so try the predefined ones..
  177.   on L3 goto CNAME, CSTR, CDEX, CAIM, CIQ, CTRAIN, CCREDIT, CJOB, CSTOP;
  178.  
  179. ! Nope, try a 'DEFAULT' line
  180.   if not dotext( "DEFAULT" ) then
  181.     writeln( "I don't know anything about that!" );
  182.   endif;
  183.   goto CHAT1;
  184.  
  185. :CNAME 
  186.   writeln( "My name is ", NPC.name, "."                    );
  187.   goto CHAT1;
  188.  
  189. :CSTR
  190.   writeln( "Strength let's you carry heavier weights" );
  191.   writeln( "It also increases the damage you do with contact weapons" );
  192.   goto CHAT1;
  193.  
  194. :CDEX
  195.   writeln( "Dexterity allows you to a void hits when being attacked" );
  196.   writeln( "It also helps avoid traps!" );
  197.   goto CHAT1;
  198.  
  199. :CAIM
  200.   writeln( "Good aim is needed when using missle weapons." );
  201.   writeln( "During a fight, the targets move a lot and aim is essential" );
  202.   goto CHAT1;
  203.  
  204. :CSPD
  205.   writeln( "With practice, your body can react a lot faster than you can" );
  206.   writeln( "think.  Speed gives you an edga allowing an extra hit during" );
  207.   writeln( "a battle." );
  208.   goto CHAT1;
  209.  
  210. :CIQ
  211.   writeln( "A magician must learn to concentrate and focus their mental" );
  212.   writeln( "powers.  I teach techniques that increase your ability to tap" );
  213.   writeln( "your inner strength." );
  214.   goto CHAT1;
  215.  
  216. :CCREDIT
  217.   L3 = select( "MasterCard", 
  218.                "Visa",
  219.                "Am. Express",
  220.                "Diner's Club",
  221.                "Discover",
  222.                "Sears" );
  223.   if L3 >= 0 then
  224.     if L15 > 0 then
  225.       writeln( "I don't take that one either.." );
  226.       if L15 = 2 then
  227.         writeln( "(you start to see a pattern here..)" );
  228.       endif;
  229.     else
  230.       writeln( "Sorry, I don't take that one.." );
  231.     endif;
  232.   endif;
  233.   inc( L15 );
  234.   goto CHAT1;
  235.  
  236. :CTRAIN
  237.   writeln( "What do you want to train in?" );
  238.   goto LOOP;
  239.  
  240. :CJOB
  241.   writeln( "I teach people to use what nature has already given them!" );
  242.   goto CHAT1;
  243.  
  244. ! Feel free to expand on this list.. !
  245.  
  246. !-----------------------------------------------------------------!
  247. ! All STOPs now lead here so the screen can be restored if needed !
  248. !-----------------------------------------------------------------!
  249. :XSTOP
  250.   if npc.picture >= 0 then
  251.     paint(window); ! Assumes the picture fits in the window !
  252.   endif;
  253.   STOP;
  254.  
  255.  
  256.